package com.twu.biblioteca;

public class LoginOption extends LibraryOption{
    public LoginOption(Library library) {
        super("Login", library);
    }


    public boolean check(String username, String password) {
        for (User user : this.getLibrary().getUsers()){
            if (username.equals(user.getName()) && password.equals(user.getPassword())){
                return true;
            }
        }
        return false;
    }
}
